#include("/static/themes/default/inc/layout.html")
#@layout()
#define css()
<link href="/static/themes/default/static/libs/viewerjs/viewer.min.css" rel="stylesheet">
<link href="/static/public/libs/highlight/styles/atom-one-dark.css" rel="stylesheet">
<link href="/static/themes/default/static/libs/notyf/notyf.min.css" rel="stylesheet">
<link rel="stylesheet" href="/static/themes/default/static/css/article.css?v=#(version)">
<link href="/static/public/css/ckEditor.css?v=#(version)" rel="stylesheet">
<link href="/static/public/libs/perfree-comment/perfree-comment.css?v=#(version)" rel="stylesheet">
<link rel="stylesheet" href="/static/themes/default/static/css/link.css?v=#(version)">
#include("/static/themes/default/inc/custom_bg.html")
#end
#define content()
<div class="d-wrapper">
    <div class="d-banner">
        <div class="d-hero-box">
            <h1 class="d-hero-title wow fadeInUp" data-wow-duration="0.2s">#(article.title ??)</h1>
            <p class="d-hero-desc wow fadeInUp" data-wow-duration="0.4s">
                <span>
                    <i class="fa fa-user-o"></i> #(article.user.userName ??)
                </span>
                <span>
                    <i class="fa fa-clock-o"></i> #date(article.createTime, "yyyy年MM月dd日")
                </span>
                <span>
                    <i class="fa fa-eye"></i> #(article.viewCount ??)
                </span>
                <span>
                    <i class="fa fa-comment-o"></i> #(article.commentCount ??)
                </span>
            </p>
        </div>
    </div>
</div>
<section class="d-container">
    <section class="d-article-container">
        #linkPage(pageSize=999)

            <ul class="d-link-container layui-row layui-col-space15">
                #for(link: linkPage.data)
                    <li class="d-link-box layui-col-xs12 layui-col-sm6 layui-col-md4" href="#(link.address)" target="_blank">
                        <a class="d-link  wow fadeInUp" data-wow-duration="#(for.count * 0.3)s" href="#(link.address)" target="_blank">
                            <section class="d-link-title">
                                <h2>#(link.name)</h2>
                            </section>
                            <section class="d-link-content">
                                <section class="d-link-desc">#(isBlank(link.desc) ? '暂无描述': link.desc)</section>
                                <img src="#(isBlank(link.logo) ? '/static/themes/default/static/imgs/nopic.jpg': link.logo)" width="50px" height="50px">
                            </section>
                        </a>
                    </li>
                #end
            </ul>

            <article class='d-article-content #if(article.contentModel == "html") ck-content #end' id="d-article-content">
                #if(article.contentModel == "html")
                    #(article.content ??)
                #else
                    #mdToHtml(article.content ??)
                #end
            </article>

            <div class="d-article-bottom">
                <span>Last Updated: </span>
                <span>
                    #if(article.updateTime != null)
                        #date(article.updateTime, "yyyy/MM/dd HH:mm:ss")
                    #else
                        #date(article.createTime, "yyyy/MM/dd HH:mm:ss")
                    #end
                </span>
            </div>

            <div class="d-comments">
                <div class="perfree-comment" data-article-id="#(article.id)"></div>
            </div>
        #end
    </section>
</section>
<div class="d-toc"></div>

#end

#define script()
<script src="/static/themes/default/static/libs/viewerjs/viewer.min.js"></script>
<script src="/static/public/libs/highlight/highlight.pack.js"></script>
<script src="/static/themes/default/static/libs/notyf/notyf.min.js"></script>
<script src="/static/public/libs/perfree-comment/perfree-comment.js?v=#(version)"></script>
<script src="/static/themes/default/static/js/article.js"></script>
#end